package 作业;

import java.util.Random;

public class 随机数求和 {
    public static void main(String[] args) {
        Random r = new Random();

        int[] arr = new int[6];
        //arr[0] = r.nextInt(101);
        //arr[1] = r.nextInt(101);
        //arr[2] = r.nextInt(101);
        //arr[3] = r.nextInt(101);
        //arr[4] = r.nextInt(101);
        //arr[5] = r.nextInt(101);

        int sum = 0;

        for (int i = 0; i < arr.length; i++) {
            arr[i] = r.nextInt(101);
            sum +=arr[i];
        }
        System.out.println(sum);
    }
}
